package com.zhdl.modules.demo.testprocess;
import com.zhdl.common.ytools.callback.CommonCallback;
import com.zhdl.modules.process.BaseProcess;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;

@Component
@Slf4j
public class TestBranch1 extends BaseProcess {
    @Resource
    TestProcessInit testProcessInit;
    @Override
    public void initHardware() {
        statusHolder.initComplete = true;
        initProcessList();
        statusHolder.setOptInterface(new ChildOptImp(this));
    }

    @Override
    public void initLocation(CommonCallback<String> complete) {
        super.initLocation(complete);
        statusHolder.initComplete = true;
    }

    @Override
    public void initProcessList() {
        processBeanList = testProcessInit.getBranch1(s -> {
            statusHolder.isRunning = false;
            this.process = 0;
            statusHolder.process = 0;
        });
    }
}
